/* 
 * File:   tree_model.hpp
 * Author: jolo
 *
 * Created on 12. Oktober 2011, 14:06
 */

#ifndef WIDGETS_TREE_MODEL_HPP
#define	WIDGETS_TREE_MODEL_HPP

#include "standard_item_model.hpp"

namespace model {
    class entity;
    typedef shared_ptr<entity> entity_ptr;
}

namespace widgets
{

    class tree_model: public standard_item_model
    {
        Q_OBJECT
    public:
        tree_model(model::entity_ptr root_entity, QObject* p);
        virtual ~tree_model();
        
    protected:
        model::entity_ptr get_root_entity() const {
            return root_entity_;
        }
        void set_root_entity(model::entity_ptr r);
        
    private:
        model::entity_ptr root_entity_;
    };
}

#endif	/* TREE_MODEL_HPP */

